package com.fingard.dsp.bank.reqrespobj.ordermsg;

import com.fingard.dsp.bank.reqrespobj.ReqRespHeader;
import com.fingard.dsp.bank.reqrespobj.RequestBase;
import com.fingard.dsp.bank.reqrespobj.mailedmsg.ReqMailedMsgQryDetail;
import com.fingard.xml.XmlTextReader;

public class ReqOrderMsgQry extends RequestBase {
    //接入机构号
    public String CHANNEL_CODE="";
    //申请单ID
    public String DetailId="";
    //厂家编码
    public String MANUFACTOR_CODE="";
    //经销商代码
    public String DealerCode="";
    //经销商名称
    public String DealerName="";
    //订单金额合计
    public String OrderTotallAmount="";
    //申请总数量
    public String OrderNum="";
    //申请日期
    public String OrderConfirmDate="";
    //车辆价格
    public String PickupPrice="";
    //订单号
    public String OrderCode="";
    //票据号
    public String BillNo="";
    //品牌
    public String CarTypeCode="";
    //票据号(备用)
    public String BillInfoNo="";
    //票面金额
    public String BillMoney ="";
    //预留字段1
    public String Reserve1="";
    //预留字段2
    public String Reserve2="";
    //预留字段3
    public String Reserve3="";

    private XmlTextReader xmlReader;

    public ReqOrderMsgQry(XmlTextReader p_xmlReader, ReqRespHeader p_header) throws Exception {
        reqHeader = p_header;
        xmlReader = p_xmlReader;
        CHANNEL_CODE = xmlReader.getSimpleText("CHANNEL_CODE");
        DetailId = xmlReader.getSimpleText("DetailId");
        MANUFACTOR_CODE = xmlReader.getSimpleText("MANUFACTOR_CODE");
        DealerCode = xmlReader.getSimpleText("DealerCode");
        DealerName = xmlReader.getSimpleText("DealerName");
        OrderTotallAmount = xmlReader.getSimpleText("OrderTotallAmount");
        OrderNum = xmlReader.getSimpleText("OrderNum");
        OrderConfirmDate = xmlReader.getSimpleText("OrderConfirmDate");
        PickupPrice = xmlReader.getSimpleText("PickupPrice");
        OrderCode = xmlReader.getSimpleText("OrderCode");
        BillNo = xmlReader.getSimpleText("BillNo");
        CarTypeCode = xmlReader.getSimpleText("CarTypeCode");
        BillInfoNo = xmlReader.getSimpleText("BILL_INFO_NO");
        BillMoney = xmlReader.getSimpleText("BillMoney");
        Reserve1 = xmlReader.getSimpleText("RESERVE1");
        Reserve2 = xmlReader.getSimpleText("RESERVE2");
        Reserve3 = xmlReader.getSimpleText("RESERVE3");
    }
    
    public RetAtsOrderMsgDetail ReqDetail;
    public boolean readRecord() throws Exception{
    	ReqDetail = null;
        if(xmlReader.read(PATH_Detail)){
        	ReqDetail = new RetAtsOrderMsgDetail(xmlReader.readedXElement);
            return true;
        }
        else{
            return false;
        }
    }
}
